package com.whfc.mach.manager.strategy.work;

import com.whfc.mach.dto.AppMachDaySegDTO;
import com.whfc.mach.manager.util.MachSegmentUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;

/**
 * @Description:
 * @author: xugcheng
 * @version: 1.0
 * @date: 2020-12-11 15:23
 */
public class DefaultWorkStrategy implements WorkStrategy {

    private Logger logger = LoggerFactory.getLogger(DefaultWorkStrategy.class);

    @Override
    public Integer amend(Integer workState) {
        return workState;
    }

    @Override
    public List<AppMachDaySegDTO> amend(List<AppMachDaySegDTO> segmentList) {
        List<AppMachDaySegDTO> amendSegList = MachSegmentUtil.amendMachDaySegment(segmentList);
        logger.debug("修正工时分段,{}->{}", segmentList.size(), amendSegList.size());
        return amendSegList;
    }
}
